Skip to content

Conversation

@tomchy
Copy link
Contributor

@tomchy tomchy commented Oct 14, 2025

Add A/B sample variant, that describe multi-image FW through a MCUboot manifest with digests.

@NordicBuilder NordicBuilder added doc-required PR must not be merged without tech writer approval. manifest changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Oct 14, 2025
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Oct 14, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
mcuboot nrfconnect/sdk-mcuboot@484a6f3 nrfconnect/sdk-mcuboot#560 nrfconnect/sdk-mcuboot#560/files
zephyr nrfconnect/sdk-zephyr@cefb2ed nrfconnect/sdk-zephyr#3460 nrfconnect/sdk-zephyr#3460/files

DNM label due to: 2 projects with PR revision

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@NordicBuilder
Copy link
Contributor

NordicBuilder commented Oct 14, 2025

CI Information

To view the history of this post, click the 'edited' button above
Build number: 12

Inputs:

Sources:

more details

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (0)

Outputs:

Toolchain

Version:
Build docker image:

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ❌ Toolchain
  • ❌ Build twister
  • ❌ Integration tests

Note: This message is automatically posted and updated by the CI

@NordicBuilder
Copy link
Contributor

Memory footprint analysis revealed the following potential issues

applications.hpf.gpio.icmsg[nrf54l15dk/nrf54l15/cpuflpr]: High RAM usage: 9102[B] - link (cc: @nrfconnect/ncs-ll-ursus)
applications.hpf.gpio.icmsg[nrf54l15dk/nrf54l15/cpuflpr]: High ROM usage: 5858[B] - link (cc: @nrfconnect/ncs-ll-ursus)
applications.hpf.gpio.icbmsg[nrf54l15dk/nrf54l15/cpuflpr]: High RAM usage: 12744[B] - link (cc: @nrfconnect/ncs-ll-ursus)
applications.hpf.gpio.icbmsg[nrf54l15dk/nrf54l15/cpuflpr]: High ROM usage: 9492[B] - link (cc: @nrfconnect/ncs-ll-ursus)

Note: This message is automatically posted and updated by the CI (latest/sdk-nrf/PR-25036/2)

@tomchy tomchy force-pushed the feature/mcuboot/NCSDK-NONE_Transaction_manifest branch from b649761 to 40e458e Compare October 17, 2025 15:19
@tomchy tomchy force-pushed the feature/mcuboot/NCSDK-NONE_Transaction_manifest branch from 40e458e to f89b505 Compare October 22, 2025 13:53
@tomchy tomchy force-pushed the feature/mcuboot/NCSDK-NONE_Transaction_manifest branch from f89b505 to 85cf3c7 Compare October 22, 2025 13:55
@tomchy tomchy force-pushed the feature/mcuboot/NCSDK-NONE_Transaction_manifest branch 2 times, most recently from 4d98c2a to c194719 Compare October 24, 2025 09:12
Add a copy of the img_mgmt.c file, so it can be adjusted to work
with all NCS-specific extensions.

Zephyr revision: 25269118b5069ebb72316d2a26bdedbe6ba8de95

Signed-off-by: Tomasz Chyrowicz <[email protected]>
Adds handling code to allow selecting the correct image slot when
using QSPI XIP in DirectXIP mode

In case of Direct XIP and multiple images, the radio active slot changes
accordingly (i.e. application slot 1 boots radio slot 1).

Moved from sdk-zephyr commit: 0fb761832466933b322fb8030c9ec934b62aa128

Signed-off-by: Jamie McCrae <[email protected]>
Signed-off-by: Tomasz Chyrowicz <[email protected]>
The "zephyr-code-partition" chosen DTS node cannot be used when build
uses Partition Manager. In that case, mcumgr must rely on the
definitions provided by the Partition Manager.

Jira: NCSDK-21381

Moved from sdk-zephyr commit: e6d6cc0c6ada8c69a021c5bbc13f52831c7c53a3

Signed-off-by: Marek Pieta <[email protected]>
Signed-off-by: Dominik Ermel <[email protected]>
Signed-off-by: Tomasz Chyrowicz <[email protected]>
Add a possibility to automatically generate a MCUboot manifest with all
expected image's digests.

Signed-off-by: Tomasz Chyrowicz <[email protected]>
@tomchy tomchy force-pushed the feature/mcuboot/NCSDK-NONE_Transaction_manifest branch from c194719 to 5a78c42 Compare November 4, 2025 16:10
Copilot AI review requested due to automatic review settings November 4, 2025 16:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds A/B update sample variant demonstrating multi-image firmware updates through MCUboot manifests with digests, enabling transactional updates of multiple images atomically. The implementation introduces manifest-based dependency management for split-slot DirectXIP configurations.

Key Changes:

  • Adds manifest-based transactional update support in MCUboot configuration
  • Implements a new A/B split-slot sample demonstrating separated application and radio core images
  • Updates image management code to handle manifest verification and slot selection

Reviewed Changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
west.yml Updates Zephyr and MCUboot revisions to pull requests supporting manifest features
sysbuild/Kconfig.mcuboot Adds Kconfig options for manifest-based transactional updates
sysbuild/CMakeLists.txt Implements manifest image target assignment and configuration propagation
subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt_state.c Modifies slot state handling to use manifest image when manifest updates enabled
subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c Adds full img_mgmt implementation with manifest verification support
subsys/mgmt/mcumgr/grp/img_mgmt/Kconfig Adds QSPI XIP split image configuration option
subsys/mgmt/mcumgr/grp/img_mgmt/CMakeLists.txt Updates build to include new img_mgmt.c and marks upstream file as header-only
subsys/bootloader/Kconfig Adds application-side Kconfig options for manifest updates
scripts/ci/license_allow_list.yaml Adds img_mgmt.c to Apache-2.0 license allowlist
samples/dfu/ab_split/* New sample demonstrating A/B updates with separated slots and manifest-based dependencies
cmake/sysbuild/mcuboot_manifest.cmake Implements manifest YAML generation for primary and secondary slots
cmake/sysbuild/image_signing.cmake Adds manifest appending to imgtool signing process

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

#endif
};

static const struct mgmt_handler img_mgmt_handlers[];
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forward declaration of 'img_mgmt_handlers' is redundant since the array is already fully defined at line 1224. This forward declaration should be removed to avoid confusion.

Suggested change
static const struct mgmt_handler img_mgmt_handlers[];

Copilot uses AI. Check for mistakes.
@tomchy tomchy force-pushed the feature/mcuboot/NCSDK-NONE_Transaction_manifest branch from 5a78c42 to 732b90c Compare November 4, 2025 16:29
Copilot AI review requested due to automatic review settings November 5, 2025 11:04
@tomchy tomchy force-pushed the feature/mcuboot/NCSDK-NONE_Transaction_manifest branch from 732b90c to 0dcb062 Compare November 5, 2025 11:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tomchy tomchy force-pushed the feature/mcuboot/NCSDK-NONE_Transaction_manifest branch from 0dcb062 to 4a63b81 Compare November 5, 2025 11:51
Add routines to parse and check manifest state.

Signed-off-by: Tomasz Chyrowicz <[email protected]>
Add a variant of the A/B sample that presents how to perform A/B updates
in a system, where application and radio images uses separate images and
slots.

Ref: NCSDK-35733

Signed-off-by: Tomasz Chyrowicz <[email protected]>
Copilot AI review requested due to automatic review settings November 5, 2025 15:42
@tomchy tomchy force-pushed the feature/mcuboot/NCSDK-NONE_Transaction_manifest branch from 4a63b81 to 886a5ae Compare November 5, 2025 15:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


rc = img_mgmt_find_tlvs(image_slot, &data_off, &data_end, IMAGE_TLV_PROT_INFO_MAGIC);
if (rc != 0) {
return IMG_MGMT_ERR_NO_TLVS;
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect return type: function boot_check_manifest returns bool but IMG_MGMT_ERR_NO_TLVS is an integer error code. Should return false instead.

Suggested change
return IMG_MGMT_ERR_NO_TLVS;
return false;

Copilot uses AI. Check for mistakes.
If it is defined, the application is running from slot B.
Otherwise, it is running from slot A.

If the project does not use the Partition Manager (a configuration currently only supported on the nRF54H20), the currently running slot can be identified by comparing the address pointed `zephyr,code-partition` to specific node addresses defined in the device tree.
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected 'pointed' to 'pointed to by' for grammatical accuracy.

Suggested change
If the project does not use the Partition Manager (a configuration currently only supported on the nRF54H20), the currently running slot can be identified by comparing the address pointed `zephyr,code-partition` to specific node addresses defined in the device tree.
If the project does not use the Partition Manager (a configuration currently only supported on the nRF54H20), the currently running slot can be identified by comparing the address pointed to by `zephyr,code-partition` to specific node addresses defined in the device tree.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. DNM doc-required PR must not be merged without tech writer approval. manifest manifest-mcuboot manifest-zephyr

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants